
.ui-draggable {
  &.drag {
    text-align: center;
    background: #dbf1ff;
    border: $border-style;
    color: #59baf5;
    height: 50px !important;
    line-height: 50px;
    z-index: 2;
  }
  .widget-panel {
    display: none;
  }
}

.widgetForm {
  margin-top: 4px;
  width: 100%;
  overflow: hidden;
  .item {
    float: left;
    width: 50%;
    line-height: 50px;
    height: 50px;
    position: relative;
    text-align: left;
    padding-left: 1em;
    z-index: 1;
    border-right: $border-style;
    border-bottom: $border-style;
    .iconfont{
      display: inline-block;
      vertical-align: middle;
      margin: 0 5px;
    }
    &:nth-child(2n) {
      border-right: 0;
      &:after {
        right: 30px;
        left: auto;
      }
    }
    .widget-panel {
      display: none;
    }
  }
  &.widget-Form-line{
      .item{
        width: 100%;
        border-right: 0;
      }
  }
  @include respond-to(lg) {
    .item {
      padding-left: 5px;
      font-size: 13px;
    }
  }

}

.widgetPull {
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  .items {
    @include clearfix();
    .item:nth-child(even) {
      .ico-moveChange {
        left: -15px;
      }
    }
    + .item {
      .ico-moveTop {
        visibility: hidden !important;
      }
    }
  }
  .item {
    &:hover {
      .ico-moveTop {
        visibility: visible;
      }
    }
    &:nth-child(1) {
      .ico-moveTop {
        visibility: hidden !important;
      }
    }
    &.half {
      width: 50%;
      float: left;
      .date-drop {
        width: 40%;
      }
      &:hover {
        .ico-moveTop {
          visibility: hidden;
        }
        .ico-moveDown, .ico-moveChange {
          visibility: visible;
        }
      }
    }
  }
  .preview {
    display: none;
  }
  .iconfont{
    font-size: 18px;
    color: #666;
    margin: 0 5px;
  }
  .icon-square{
    margin-top: -3px;
  }
  .widget-panel {
    display: block !important;
  }
  .item-highlight {
    height: 100px;
    border: 1px dashed #ff5555;
  }
}

.widget-panel {
  .ico-moveTop, .ico-moveDown {
    left: 50%;
    position: absolute;
    z-index: 2;
    margin-left: -10px;
  }
  .ico-moveTop {
    top: -10px;
  }
  .ico-moveDown {
    bottom: -19px;
  }
  .ico-moveChange {
    position: absolute;
    top: 50%;
    right: -15px;
    margin-top: -6px;
  }
}

.widget-panel {
  min-height: 80px;
  position: relative;
  width: 100%;
  padding: $baseWid $baseWid $baseWid*1.4 $baseWid;
  label {
    display: block;
    margin-bottom: $baseWid;
    &.require {
      &:before {
        content: '*';
        color: $orange;
        padding: 0 3px;
        @include inline-block();
        vertical-align: middle;
      }
    }
  }
  p {
    min-height: 100px;
  }
  textarea {
    width: 100%;
    border: $border-style;
  }
  select {
    border: $border-style;
    line-height: 40px;
    height: 40px;
    width: 100%;
    @include inline-block();
    margin-right: $baseWid;
  }
  input[type=text] {
    width: 100%;
    border: $border-style;
    line-height: 40px;
    height: 40px;
    padding: 0 $baseWid;
  }
  .date-drop {
    @include inline-block();
    vertical-align: middle;
    line-height: 40px;
    border: $border-style;
    text-align: left;
    padding-left: 1em;
    width: 25%;
    min-width: 100px;
    margin: 0 $baseWid/2 5px;
    position: relative;
    &:after {
      position: absolute;
      right: $baseWid/2;
      top: 50%;
      margin-top: -5px;
      @include triangle(top, #666, 6px, 6px);
    }

  }
  .ico-close {
    position: absolute;
    top: 0;
    right: $baseWid;
    visibility: hidden;
  }
  .ico-moveChange, .ico-moveTop, .ico-moveDown {
    visibility: hidden;
  }
  &:hover {
    background: #f3f4f8;
    .ico-close {
      visibility: visible;
    }
  }
  &.widget-span {
    .span {
      @include inline-block();
      margin: 0 5px;
    }
  }
  &.widget-pull {
    min-height: 100px;
    border: 1px dashed $orange;
  }
  &.widget-label {
    padding: 20px 15px 5px;
    label {
      @include inline-block();
      vertical-align: top;
      margin-bottom: 0;
      width: 100px;
      line-height: 28px;
      text-align: right;
      padding-right: 1em;
    }
    .ico-close {
      right: 5px;
    }
    .widget-aside {
      @include inline-block();
      width: calc(100% - 120px) !important;
      vertical-align: top;
    }
  }

}

.widget-inputxt,.widget-drop,.widget-staff,.widget-pic,.widget-datezone{
  &.widget-label{
    label{
      line-height: 38px !important;
    }
  }

}

.widget-drop {
  .date-drop {
    width: 100%;
    margin: 0 auto;
  }
}

.widget-btn {
  .widget-group {
    padding-top: 1em;
  }
  .btn {
    color: #fff;
    background: $primary-color;
    line-height: 32px;
    @include inline-block();
    text-align: center;
    min-width: 100px;
    margin: 10px;
    border: 1px solid $primary-color;
  }
  .btn-reversal {
    background: none;
    color: $primary-color;

  }
}

.widget-pic {
  &.widget-label{
    .pic{
      margin: 0;
    }
  }
  .pic {
    color: #535353;
    width: 80%;
    background: #f5f5f5;
    margin: 1em auto;
    padding: 8px 0;
    text-align: center;
    border: 1px dashed #ddd;
  }
}

.widget-check {
  input[type=text] {
    width: 200px !important;
    margin-left: 6px;
  }
}

.widget-textarea {
  textarea {
    min-height: 100px;
    padding: $baseWid;
  }
  span {
    float: right;
    //position: absolute;
    //right: $baseWid/2;
    //bottom: $baseWid/2;
  }
  &.widget-label{
    span{
      right: $baseWid;
    }

  }
}

//布局控件
.widget-layouts{
  .info{
    color: #999;
    height: auto;
    line-height: 1.5;
    padding-bottom: 10px;
    margin-top: -10px;
  }
  .ly{
    width: 100%;
    overflow-x: auto;
    height: auto;
    border: $border-style;
    border-bottom: none;
    background: #fff;
  }
  .ly-row{
    width: 100%;
    height: 100%;
    @include clearfix();
    border-bottom: $border-style;
  }
  .ly-it{
    min-height: 80px;
    float: left;
    width: 33.33%;
    height: 100%;
    //padding-bottom:9999px;
    //margin-bottom: -9999px;
    overflow: hidden;
    border-right: $border-style;
    .ico-moveTop,.ico-moveDown,.ico-moveChange{
      display: none !important;
    }
    &:last-child{
      border-right: 0;
    }
    &.on{
      background: #fafbfd;
    }
  }
  .handles{
    border-right: $border-style;
    margin-top: 10px;
    @include clearfix();
    .hd-it{
      float: right;
      width: 19%;
      text-align: center;
      line-height: 32px;
      border: $border-style;
      border-right: 0;
      max-width: 120px;
      background: #fff;
    }

    .hd-unEdit{
      color: #999;
      cursor: text !important;
    }
  }
}


